local huozhong = fk.CreateSkill {
  name = "huozhong",
}

huozhong:addEffect("active", {
  anim_type = "drawcard",
  target_num = 0,
  card_num = 1,
  prompt = "#huozhong-invoke",
  can_use = function(self, player)
    return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0 and not player:hasDelayedTrick("supply_shortage")
    and not table.contains(player.sealedSlots, Player.JudgeSlot)
  end,
  card_filter =function (self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).type ~= Card.TypeTrick and Fk:getCardById(to_select).color == Card.Black
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local card = Fk:cloneCard("supply_shortage")
    card:addSubcards(effect.cards)
    player:addVirtualEquip(card)
    room:moveCardTo(card, Card.PlayerJudge, player, fk.ReasonPut, self.name)
    if not player.dead then
      player:drawCards(2, self.name)
    end
  end,
})
huozhong.attached_skill_name="huozhong&"
return huozhong